package cn.siat.file.service;

import cn.siat.common.core.domain.R;
import cn.siat.common.core.web.domain.AjaxResult;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * 文件上传接口
 * 
 * @author siat
 */
public interface ISysFileService
{
    /**
     * 文件上传接口
     * 
     * @param file 上传的文件
     * @return 访问地址
     * @throws Exception
     */
    String uploadFile(MultipartFile file) throws Exception;
    R<?> checkIsUtf8(MultipartFile file,Long fileSize) throws IOException;
    String uploadFileSequence(MultipartFile file,String folderPath) throws Exception;
    /**
     * 上传大文件切片
     * @param file
     * @param identifier
     * @param chunkNumber
     * @return
     */
    ResponseEntity<?> uploadBigFile(MultipartFile file, String identifier, String chunkNumber, Long totalSize) throws IOException;

    String mergeBigFile(String identifier,String filename,String totalSize,String folderPath,Integer isConvertUtf8) throws IOException;
}
